vcPythonTransportController
This is a transport controller behavior that delegates the concrete implementation to user-made Python script(s), which allows creating specialized and custom transport controllers. The behaviour provides events and methods required to handle transport and work tasks. Python transport controller behaviours can be added to static components. The script implementation should subscribe to the OnBeginTransport and OnBeginWork events. When these events are triggered, the script is expected to create tasks to some internal queue and process them asynchronously. Transport controllers must accept and handle all \"assigned\" transport and work tasks to completion, there is no task rejection or cancellation mechanism. If and how a transport controller uses separate resources for completing the tasks is entirely up to the specific implementation to decide. A transport task is considered done when the product instance is placed into the target component container. The target container and position should be queried from the target transport node. Work tasks need to be completed by calling the workDone method using the RequestId that was received in the OnBeginWork event. Transport controllers get an event when the controller is assigned as an implementer of a transport link, and similarly when a link is assigned some other controller. These events (OnLinkAssociated and OnLinkDisassociated) allow the controller to create any custom properties into all transport links it implements.
See in: Overview
Module: vcProcessModel
Parent: vcTransportController
Children -
Referenced by: vcWorkStatement.Controller
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Icon | String | RW | Gets or sets the icon file used to represent this transport controller in UI.See moreDefines either filesystem path to the SVG image file or an SVG path data. Both relative and absolute paths with/without .svg extension are allowed. Relative paths are relative to the Icons or Icons. Additional folder under VC installation folder. |
| IconColor | String | RW | Gets or sets the fill color applied to the of the Icon in ARGB, RGB or unqualified-color-name format. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| workDone | None | Integer workId | Notifies the Work statement that work has been done so the process can continue executing. Parameters: workId (Integer): The work Id for notifying. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnBeginTransport | None | Triggered when the transport controller is asked to transport one or more products.See moreEach product should be transported to the Destination node of the respective transport link. Parameters: products (List of 2-tuple (vcTransportLink, vcProduct)) |
| OnBeginWork | vcBeginWorkData data | Triggered when a Work statement gets executed.See moreThe workDone method with correct request id must be called at some point for Work statement to continue execution. A Work statement might wait indefinitely if a handler for this event is not registered. Parameters: data (vcBeginWorkData): The work request parameters. |
| OnLinkAssociated | vcTransportLink link | Raised when a transport link is associated with this controller.See moreIf a handler is not registered, the default internal implementation is called. Parameters: link (vcTransportLink): The link associated. |
| OnLinkDisassociated | vcTransportLink link | Raised when a transport link is disassociated from this controller.See moreIf a handler is not registered, the default internal implementation is called. Parameters: link (vcTransportLink): The link disassociated. |